<?php
session_start();
if(!isset($_SESSION['ten_dn'])){
   header('Location: dangnhap.php');
}
mysql_query("SET NAMES 'UTF8'");
include('../configs/connect.php');
include('include.php');

include('db.php');
$db = new db_mysql();
$db->connect($host,$name,$pass,$database);

$smarty->assign('ten_DN',$_SESSION['ten_dn']);
$smarty->assign('ten_pq',$_SESSION['ten_pq']);
$smarty->assign('ma_pq',$_SESSION['ma_pq']);

//khai bao mảng menu trái
$ds_menu=array();
$ds_menucon=array();

if(isset($_GET['muc']))
        $muc=$_GET['muc'];
    else
        $muc='index';
$ds_menu[$muc]="current";


if(isset($_GET['modul']))
    $modul=$_GET['modul'];
else
    $modul='index';
$ds_menucon[$modul]="current";


$smarty->assign("menu",$ds_menu);    
$smarty->assign("menucon",$ds_menucon);

ob_start();
if( $_SESSION['ma_pq']=='sv'||$_SESSION['ma_pq']=='trungtam'){
    $smarty->display('header2.tpl');    
}else{
    $smarty->display('header.tpl');   
}
?>